<template>
	<div class="headerbox">
		<mymask v-if="open" @getChildrenflag="seting" :btn="mydate.btn"></mymask>
		<div class="left">
			<router-link to="/"><img src="../../../../static/image/log.png" /></router-link>
			<span>重庆<i></i></span>
		</div>
		<div class="right">
			<i class="serch" @click="openserch"></i>
			<p class="login"></p>
		</div>

	</div>
</template>

<script>
	import mymask from '@/components/public/mymask'
	export default {
		data() {
			return {
				mydate: {
					btn: ['', '取消']
				},
				open: false
			}

		},
		components: {
			mymask
		},
		methods: {
			seting(res) {
				if(res.cances == 1) {
					this.open = res.flag;
				}
			},
			openserch: function() {
				this.open = true;
			}
		}
	};
</script>

<style scoped="scoped">
	.headerbox {
		width: 7.5rem;
		height: 0.8rem;
		display: flex;
		justify-content: space-between;
		padding: 0 0.2rem;
		box-sizing: border-box;
	}
	
	.left {
		width: 3rem;
		height: 0.8rem;
	}
	
	.left>a>img {
		width: 0.8rem;
		margin-top: .1rem;
	}
	
	.left>span {
		display: inline-block;
		width: 1.5rem;
		height: 0.8rem;
		line-height: 0.8rem;
		font-size: 0.25rem;
		text-align: center;
		color: white;
	}
	
	.left>span>i {
		background: url(../../../../static/image/icon_sprites.png) no-repeat;
		background-size: 10rem 10rem;
		background-position: -1.8rem -.2666667rem;
		width: .18666667rem;
		height: .12rem;
		display: inline-block;
		content: "";
		vertical-align: 1px;
		margin-left: 0.05rem;
	}
	
	.right {
		width: 3rem;
		height: 0.8rem;
	}
	
	.serch {
		display: inline-block;
		background: url(../../../../static/image/icon_sprites.png) no-repeat;
		background-size: 8rem 8rem;
		width: 1.08rem;
		height: .8rem;
		background-position: -1.05rem -.55rem;
		position: absolute;
		top: .04rem;
		right: 1rem;
	}
	
	.login {
		background: url(../../../../static/image/icon_sprites.png) no-repeat;
		background-size: 9rem 9rem;
		background-position: -.51rem 0.1rem;
		display: block;
		width: 0.8rem;
		height: .8rem;
		position: absolute;
		top: 0;
		right: 0rem;
	}
	
	a,
	a:hover,
	a:active,
	a:visited,
	a:link,
	a:focus {
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
		-webkit-tap-highlight-color: transparent;
		outline: none;
		background: none;
		text-decoration: none;
	}
</style>